package com.andnnl.timestamp;

import java.util.TimeZone;

/**
 * Created by chenss on 2020/11/20.
 */
public class ToDayTest {
    public static void main(String[] args) {
        long current = System.currentTimeMillis();
        long zero = current-(current+ TimeZone.getDefault().getRawOffset())%(1000*3600*24);
        System.out.println("zero:"+zero);
        System.out.println("TimeZone.getDefault().getRawOffset():"+TimeZone.getDefault().getRawOffset());

        long currentSec = System.currentTimeMillis()/1000;
        long zeroSec = currentSec-(currentSec+ TimeZone.getDefault().getRawOffset()/1000)%(3600*24);
        System.out.println("zeroSec:"+zeroSec);

        long now = System.currentTimeMillis() / 1000L;
        long daySecond = 3600 * 24;
        long toDay = now - (now + 8 * 3600) % daySecond;
        System.out.println(toDay);
        System.out.println(8 * 3600);
        System.out.println(1000*3600*24);
        System.out.println(new String[]{"asdf","ddddd"});
    }
}
